package com.qwz.learn;

/**
* @Description:  懒汉模式 - 线程不安全，延迟初始化，严格意义上不是不是单例模式
* @Author: Qiuwuzhi
* @CreateDate: 2019/12/12 9:06
* @Version V1.0
*/
public class Singleton {

    private static Singleton instance;

    //构造方法私有
    private Singleton(){

    }

    public static Singleton getInstance(){
        if (instance==null){
            instance = new Singleton();
        }
        return instance;
    }
}
